import 'package:hotpot/generated/json/base/json_convert_content.dart';
import 'package:hotpot/models/self_ordering_data.dart';

SelfOrderingData $SelfOrderingDataFromJson(Map<String, dynamic> json) {
	final SelfOrderingData selfOrderingData = SelfOrderingData();
	final String? jsonrpc = jsonConvert.convert<String>(json['jsonrpc']);
	if (jsonrpc != null) {
		selfOrderingData.jsonrpc = jsonrpc;
	}
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingData.id = id;
	}
	final SelfOrderingDataResult? result = jsonConvert.convert<SelfOrderingDataResult>(json['result']);
	if (result != null) {
		selfOrderingData.result = result;
	}
	return selfOrderingData;
}

Map<String, dynamic> $SelfOrderingDataToJson(SelfOrderingData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['jsonrpc'] = entity.jsonrpc;
	data['id'] = entity.id;
	data['result'] = entity.result?.toJson();
	return data;
}

SelfOrderingDataResult $SelfOrderingDataResultFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResult selfOrderingDataResult = SelfOrderingDataResult();
	final SelfOrderingDataResultPosSession? posSession = jsonConvert.convert<SelfOrderingDataResultPosSession>(json['pos_session']);
	if (posSession != null) {
		selfOrderingDataResult.posSession = posSession;
	}
	final Map<String, dynamic>? attributes = jsonConvert.convert<Map<String, dynamic>>(json['attributes']);
	if (attributes != null) {
		selfOrderingDataResult.attributes = attributes;
	}
	final List<SelfOrderingDataResultPosCategorys>? posCategorys = jsonConvert.convertListNotNull<SelfOrderingDataResultPosCategorys>(json['pos_categorys']);
	if (posCategorys != null) {
		selfOrderingDataResult.posCategorys = posCategorys;
	}
	final List<SelfOrderingDataResultProductProducts>? productProducts = jsonConvert.convertListNotNull<SelfOrderingDataResultProductProducts>(json['product_products']);
	if (productProducts != null) {
		selfOrderingDataResult.productProducts = productProducts;
	}
	final List<SelfOrderingDataResultPosCombo>? posCombo = jsonConvert.convertListNotNull<SelfOrderingDataResultPosCombo>(json['pos_combo']);
	if (posCombo != null) {
		selfOrderingDataResult.posCombo = posCombo;
	}
	final List<SelfOrderingDataResultPosComboLine>? posComboLine = jsonConvert.convertListNotNull<SelfOrderingDataResultPosComboLine>(json['pos_combo_line']);
	if (posComboLine != null) {
		selfOrderingDataResult.posComboLine = posComboLine;
	}
	final SelfOrderingDataResultCurrentLanguage? currentLanguage = jsonConvert.convert<SelfOrderingDataResultCurrentLanguage>(json['current_language']);
	if (currentLanguage != null) {
		selfOrderingDataResult.currentLanguage = currentLanguage;
	}
	final List<SelfOrderingDataResultAvailableLanguage>? availableLanguage = jsonConvert.convertListNotNull<SelfOrderingDataResultAvailableLanguage>(json['available_language']);
	if (availableLanguage != null) {
		selfOrderingDataResult.availableLanguage = availableLanguage;
	}
	final List<SelfOrderingDataResultHomeImages>? homeImages = jsonConvert.convertListNotNull<SelfOrderingDataResultHomeImages>(json['home_images']);
	if (homeImages != null) {
		selfOrderingDataResult.homeImages = homeImages;
	}
	final String? brandImage = jsonConvert.convert<String>(json['brand_image']);
	if (brandImage != null) {
		selfOrderingDataResult.brandImage = brandImage;
	}
	return selfOrderingDataResult;
}

Map<String, dynamic> $SelfOrderingDataResultToJson(SelfOrderingDataResult entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['pos_session'] = entity.posSession?.toJson();
	data['attributes'] = entity.attributes;
	data['pos_categorys'] =  entity.posCategorys?.map((v) => v.toJson()).toList();
	data['product_products'] =  entity.productProducts?.map((v) => v.toJson()).toList();
	data['pos_combo'] =  entity.posCombo?.map((v) => v.toJson()).toList();
	data['pos_combo_line'] =  entity.posComboLine?.map((v) => v.toJson()).toList();
	data['current_language'] = entity.currentLanguage?.toJson();
	data['available_language'] =  entity.availableLanguage?.map((v) => v.toJson()).toList();
	data['home_images'] =  entity.homeImages?.map((v) => v.toJson()).toList();
	data['brand_image'] = entity.brandImage;
	return data;
}

SelfOrderingDataResultPosSession $SelfOrderingDataResultPosSessionFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultPosSession selfOrderingDataResultPosSession = SelfOrderingDataResultPosSession();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultPosSession.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultPosSession.name = name;
	}
	final List<int>? userId = jsonConvert.convertListNotNull<int>(json['user_id']);
	if (userId != null) {
		selfOrderingDataResultPosSession.userId = userId;
	}
	final List<int>? configId = jsonConvert.convertListNotNull<int>(json['config_id']);
	if (configId != null) {
		selfOrderingDataResultPosSession.configId = configId;
	}
	final String? startAt = jsonConvert.convert<String>(json['start_at']);
	if (startAt != null) {
		selfOrderingDataResultPosSession.startAt = startAt;
	}
	final dynamic? stopAt = jsonConvert.convert<dynamic>(json['stop_at']);
	if (stopAt != null) {
		selfOrderingDataResultPosSession.stopAt = stopAt;
	}
	final int? loginNumber = jsonConvert.convert<int>(json['login_number']);
	if (loginNumber != null) {
		selfOrderingDataResultPosSession.loginNumber = loginNumber;
	}
	final List<int>? paymentMethodIds = jsonConvert.convertListNotNull<int>(json['payment_method_ids']);
	if (paymentMethodIds != null) {
		selfOrderingDataResultPosSession.paymentMethodIds = paymentMethodIds;
	}
	final String? state = jsonConvert.convert<String>(json['state']);
	if (state != null) {
		selfOrderingDataResultPosSession.state = state;
	}
	final bool? updateStockAtClosing = jsonConvert.convert<bool>(json['update_stock_at_closing']);
	if (updateStockAtClosing != null) {
		selfOrderingDataResultPosSession.updateStockAtClosing = updateStockAtClosing;
	}
	final double? cashRegisterBalanceStart = jsonConvert.convert<double>(json['cash_register_balance_start']);
	if (cashRegisterBalanceStart != null) {
		selfOrderingDataResultPosSession.cashRegisterBalanceStart = cashRegisterBalanceStart;
	}
	final dynamic? accessToken = jsonConvert.convert<dynamic>(json['access_token']);
	if (accessToken != null) {
		selfOrderingDataResultPosSession.accessToken = accessToken;
	}
	return selfOrderingDataResultPosSession;
}

Map<String, dynamic> $SelfOrderingDataResultPosSessionToJson(SelfOrderingDataResultPosSession entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['user_id'] =  entity.userId;
	data['config_id'] =  entity.configId;
	data['start_at'] = entity.startAt;
	data['stop_at'] = entity.stopAt;
	data['login_number'] = entity.loginNumber;
	data['payment_method_ids'] =  entity.paymentMethodIds;
	data['state'] = entity.state;
	data['update_stock_at_closing'] = entity.updateStockAtClosing;
	data['cash_register_balance_start'] = entity.cashRegisterBalanceStart;
	data['access_token'] = entity.accessToken;
	return data;
}

SelfOrderingDataResultAttributes $SelfOrderingDataResultAttributesFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultAttributes selfOrderingDataResultAttributes = SelfOrderingDataResultAttributes();
	final SelfOrderingDataResultAttributes1? x1 = jsonConvert.convert<SelfOrderingDataResultAttributes1>(json['1']);
	if (x1 != null) {
		selfOrderingDataResultAttributes.x1 = x1;
	}
	final SelfOrderingDataResultAttributes2? x2 = jsonConvert.convert<SelfOrderingDataResultAttributes2>(json['2']);
	if (x2 != null) {
		selfOrderingDataResultAttributes.x2 = x2;
	}
	final SelfOrderingDataResultAttributes6? x6 = jsonConvert.convert<SelfOrderingDataResultAttributes6>(json['6']);
	if (x6 != null) {
		selfOrderingDataResultAttributes.x6 = x6;
	}
	return selfOrderingDataResultAttributes;
}

Map<String, dynamic> $SelfOrderingDataResultAttributesToJson(SelfOrderingDataResultAttributes entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['1'] = entity.x1?.toJson();
	data['2'] = entity.x2?.toJson();
	data['6'] = entity.x6?.toJson();
	return data;
}

SelfOrderingDataResultAttributes1 $SelfOrderingDataResultAttributes1FromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultAttributes1 selfOrderingDataResultAttributes1 = SelfOrderingDataResultAttributes1();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultAttributes1.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultAttributes1.name = name;
	}
	final String? displayType = jsonConvert.convert<String>(json['display_type']);
	if (displayType != null) {
		selfOrderingDataResultAttributes1.displayType = displayType;
	}
	final List<SelfOrderingDataResultAttributes1Values>? values = jsonConvert.convertListNotNull<SelfOrderingDataResultAttributes1Values>(json['values']);
	if (values != null) {
		selfOrderingDataResultAttributes1.values = values;
	}
	final int? sequence = jsonConvert.convert<int>(json['sequence']);
	if (sequence != null) {
		selfOrderingDataResultAttributes1.sequence = sequence;
	}
	final dynamic? canBeSetQty = jsonConvert.convert<dynamic>(json['can_be_set_qty']);
	if (canBeSetQty != null) {
		selfOrderingDataResultAttributes1.canBeSetQty = canBeSetQty;
	}
	final int? maxQty = jsonConvert.convert<int>(json['max_qty']);
	if (maxQty != null) {
		selfOrderingDataResultAttributes1.maxQty = maxQty;
	}
	return selfOrderingDataResultAttributes1;
}

Map<String, dynamic> $SelfOrderingDataResultAttributes1ToJson(SelfOrderingDataResultAttributes1 entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['display_type'] = entity.displayType;
	data['values'] =  entity.values?.map((v) => v.toJson()).toList();
	data['sequence'] = entity.sequence;
	data['can_be_set_qty'] = entity.canBeSetQty;
	data['max_qty'] = entity.maxQty;
	return data;
}

SelfOrderingDataResultAttributes1Values $SelfOrderingDataResultAttributes1ValuesFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultAttributes1Values selfOrderingDataResultAttributes1Values = SelfOrderingDataResultAttributes1Values();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultAttributes1Values.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultAttributes1Values.name = name;
	}
	final dynamic? isCustom = jsonConvert.convert<dynamic>(json['is_custom']);
	if (isCustom != null) {
		selfOrderingDataResultAttributes1Values.isCustom = isCustom;
	}
	final dynamic? htmlColor = jsonConvert.convert<dynamic>(json['html_color']);
	if (htmlColor != null) {
		selfOrderingDataResultAttributes1Values.htmlColor = htmlColor;
	}
	final dynamic? image = jsonConvert.convert<dynamic>(json['image']);
	if (image != null) {
		selfOrderingDataResultAttributes1Values.image = image;
	}
	final int? maxQty = jsonConvert.convert<int>(json['max_qty']);
	if (maxQty != null) {
		selfOrderingDataResultAttributes1Values.maxQty = maxQty;
	}
	final double? priceExtra = jsonConvert.convert<double>(json['price_extra']);
	if (priceExtra != null) {
		selfOrderingDataResultAttributes1Values.priceExtra = priceExtra;
	}
	return selfOrderingDataResultAttributes1Values;
}

Map<String, dynamic> $SelfOrderingDataResultAttributes1ValuesToJson(SelfOrderingDataResultAttributes1Values entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['is_custom'] = entity.isCustom;
	data['html_color'] = entity.htmlColor;
	data['image'] = entity.image;
	data['max_qty'] = entity.maxQty;
	data['price_extra'] = entity.priceExtra;
	return data;
}

SelfOrderingDataResultAttributes2 $SelfOrderingDataResultAttributes2FromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultAttributes2 selfOrderingDataResultAttributes2 = SelfOrderingDataResultAttributes2();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultAttributes2.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultAttributes2.name = name;
	}
	final String? displayType = jsonConvert.convert<String>(json['display_type']);
	if (displayType != null) {
		selfOrderingDataResultAttributes2.displayType = displayType;
	}
	final List<SelfOrderingDataResultAttributes2Values>? values = jsonConvert.convertListNotNull<SelfOrderingDataResultAttributes2Values>(json['values']);
	if (values != null) {
		selfOrderingDataResultAttributes2.values = values;
	}
	final int? sequence = jsonConvert.convert<int>(json['sequence']);
	if (sequence != null) {
		selfOrderingDataResultAttributes2.sequence = sequence;
	}
	final dynamic? canBeSetQty = jsonConvert.convert<dynamic>(json['can_be_set_qty']);
	if (canBeSetQty != null) {
		selfOrderingDataResultAttributes2.canBeSetQty = canBeSetQty;
	}
	final int? maxQty = jsonConvert.convert<int>(json['max_qty']);
	if (maxQty != null) {
		selfOrderingDataResultAttributes2.maxQty = maxQty;
	}
	return selfOrderingDataResultAttributes2;
}

Map<String, dynamic> $SelfOrderingDataResultAttributes2ToJson(SelfOrderingDataResultAttributes2 entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['display_type'] = entity.displayType;
	data['values'] =  entity.values?.map((v) => v.toJson()).toList();
	data['sequence'] = entity.sequence;
	data['can_be_set_qty'] = entity.canBeSetQty;
	data['max_qty'] = entity.maxQty;
	return data;
}

SelfOrderingDataResultAttributes2Values $SelfOrderingDataResultAttributes2ValuesFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultAttributes2Values selfOrderingDataResultAttributes2Values = SelfOrderingDataResultAttributes2Values();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultAttributes2Values.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultAttributes2Values.name = name;
	}
	final bool? isCustom = jsonConvert.convert<bool>(json['is_custom']);
	if (isCustom != null) {
		selfOrderingDataResultAttributes2Values.isCustom = isCustom;
	}
	final dynamic? htmlColor = jsonConvert.convert<dynamic>(json['html_color']);
	if (htmlColor != null) {
		selfOrderingDataResultAttributes2Values.htmlColor = htmlColor;
	}
	final dynamic? image = jsonConvert.convert<dynamic>(json['image']);
	if (image != null) {
		selfOrderingDataResultAttributes2Values.image = image;
	}
	final int? maxQty = jsonConvert.convert<int>(json['max_qty']);
	if (maxQty != null) {
		selfOrderingDataResultAttributes2Values.maxQty = maxQty;
	}
	final double? priceExtra = jsonConvert.convert<double>(json['price_extra']);
	if (priceExtra != null) {
		selfOrderingDataResultAttributes2Values.priceExtra = priceExtra;
	}
	return selfOrderingDataResultAttributes2Values;
}

Map<String, dynamic> $SelfOrderingDataResultAttributes2ValuesToJson(SelfOrderingDataResultAttributes2Values entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['is_custom'] = entity.isCustom;
	data['html_color'] = entity.htmlColor;
	data['image'] = entity.image;
	data['max_qty'] = entity.maxQty;
	data['price_extra'] = entity.priceExtra;
	return data;
}

SelfOrderingDataResultAttributes6 $SelfOrderingDataResultAttributes6FromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultAttributes6 selfOrderingDataResultAttributes6 = SelfOrderingDataResultAttributes6();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultAttributes6.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultAttributes6.name = name;
	}
	final String? displayType = jsonConvert.convert<String>(json['display_type']);
	if (displayType != null) {
		selfOrderingDataResultAttributes6.displayType = displayType;
	}
	final List<SelfOrderingDataResultAttributes6Values>? values = jsonConvert.convertListNotNull<SelfOrderingDataResultAttributes6Values>(json['values']);
	if (values != null) {
		selfOrderingDataResultAttributes6.values = values;
	}
	final int? sequence = jsonConvert.convert<int>(json['sequence']);
	if (sequence != null) {
		selfOrderingDataResultAttributes6.sequence = sequence;
	}
	final bool? canBeSetQty = jsonConvert.convert<bool>(json['can_be_set_qty']);
	if (canBeSetQty != null) {
		selfOrderingDataResultAttributes6.canBeSetQty = canBeSetQty;
	}
	final int? maxQty = jsonConvert.convert<int>(json['max_qty']);
	if (maxQty != null) {
		selfOrderingDataResultAttributes6.maxQty = maxQty;
	}
	return selfOrderingDataResultAttributes6;
}

Map<String, dynamic> $SelfOrderingDataResultAttributes6ToJson(SelfOrderingDataResultAttributes6 entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['display_type'] = entity.displayType;
	data['values'] =  entity.values?.map((v) => v.toJson()).toList();
	data['sequence'] = entity.sequence;
	data['can_be_set_qty'] = entity.canBeSetQty;
	data['max_qty'] = entity.maxQty;
	return data;
}

SelfOrderingDataResultAttributes6Values $SelfOrderingDataResultAttributes6ValuesFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultAttributes6Values selfOrderingDataResultAttributes6Values = SelfOrderingDataResultAttributes6Values();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultAttributes6Values.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultAttributes6Values.name = name;
	}
	final dynamic? isCustom = jsonConvert.convert<dynamic>(json['is_custom']);
	if (isCustom != null) {
		selfOrderingDataResultAttributes6Values.isCustom = isCustom;
	}
	final dynamic? htmlColor = jsonConvert.convert<dynamic>(json['html_color']);
	if (htmlColor != null) {
		selfOrderingDataResultAttributes6Values.htmlColor = htmlColor;
	}
	final dynamic? image = jsonConvert.convert<dynamic>(json['image']);
	if (image != null) {
		selfOrderingDataResultAttributes6Values.image = image;
	}
	final int? maxQty = jsonConvert.convert<int>(json['max_qty']);
	if (maxQty != null) {
		selfOrderingDataResultAttributes6Values.maxQty = maxQty;
	}
	final double? priceExtra = jsonConvert.convert<double>(json['price_extra']);
	if (priceExtra != null) {
		selfOrderingDataResultAttributes6Values.priceExtra = priceExtra;
	}
	return selfOrderingDataResultAttributes6Values;
}

Map<String, dynamic> $SelfOrderingDataResultAttributes6ValuesToJson(SelfOrderingDataResultAttributes6Values entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['is_custom'] = entity.isCustom;
	data['html_color'] = entity.htmlColor;
	data['image'] = entity.image;
	data['max_qty'] = entity.maxQty;
	data['price_extra'] = entity.priceExtra;
	return data;
}

SelfOrderingDataResultPosCategorys $SelfOrderingDataResultPosCategorysFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultPosCategorys selfOrderingDataResultPosCategorys = SelfOrderingDataResultPosCategorys();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultPosCategorys.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultPosCategorys.name = name;
	}
	final List<String>? parentId = jsonConvert.convertListNotNull<String>(json['parent_id']);
	if (parentId != null) {
		selfOrderingDataResultPosCategorys.parentId = parentId;
	}
	final List<int>? childId = jsonConvert.convertListNotNull<int>(json['child_id']);
	if (childId != null) {
		selfOrderingDataResultPosCategorys.childId = childId;
	}
	final String? writeDate = jsonConvert.convert<String>(json['write_date']);
	if (writeDate != null) {
		selfOrderingDataResultPosCategorys.writeDate = writeDate;
	}
	final bool? hasImage = jsonConvert.convert<bool>(json['has_image']);
	if (hasImage != null) {
		selfOrderingDataResultPosCategorys.hasImage = hasImage;
	}
	final int? color = jsonConvert.convert<int>(json['color']);
	if (color != null) {
		selfOrderingDataResultPosCategorys.color = color;
	}
	return selfOrderingDataResultPosCategorys;
}

Map<String, dynamic> $SelfOrderingDataResultPosCategorysToJson(SelfOrderingDataResultPosCategorys entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['parent_id'] =  entity.parentId;
	data['child_id'] =  entity.childId;
	data['write_date'] = entity.writeDate;
	data['has_image'] = entity.hasImage;
	data['color'] = entity.color;
	return data;
}

SelfOrderingDataResultProductProducts $SelfOrderingDataResultProductProductsFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultProductProducts selfOrderingDataResultProductProducts = SelfOrderingDataResultProductProducts();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultProductProducts.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultProductProducts.name = name;
	}
	final dynamic? barcode = jsonConvert.convert<dynamic>(json['barcode']);
	if (barcode != null) {
		selfOrderingDataResultProductProducts.barcode = barcode;
	}
	final String? defaultCode = jsonConvert.convert<String>(json['default_code']);
	if (defaultCode != null) {
		selfOrderingDataResultProductProducts.defaultCode = defaultCode;
	}
	final double? lstPrice = jsonConvert.convert<double>(json['lst_price']);
	if (lstPrice != null) {
		selfOrderingDataResultProductProducts.lstPrice = lstPrice;
	}
	final bool? needVegetableSequence = jsonConvert.convert<bool>(json['need_vegetable_sequence']);
	if (needVegetableSequence != null) {
		selfOrderingDataResultProductProducts.needVegetableSequence = needVegetableSequence;
	}
	final bool? canSetAttributesQty = jsonConvert.convert<bool>(json['can_set_attributes_qty']);
	if (canSetAttributesQty != null) {
		selfOrderingDataResultProductProducts.canSetAttributesQty = canSetAttributesQty;
	}
	final List<int>? attributeLineIds = jsonConvert.convertListNotNull<int>(json['attribute_line_ids']);
	if (attributeLineIds != null) {
		selfOrderingDataResultProductProducts.attributeLineIds = attributeLineIds;
	}
	final List<int>? posCategIds = jsonConvert.convertListNotNull<int>(json['pos_categ_ids']);
	if (posCategIds != null) {
		selfOrderingDataResultProductProducts.posCategIds = posCategIds;
	}
	final List<String>? comboIds = jsonConvert.convertListNotNull<String>(json['combo_ids']);
	if (comboIds != null) {
		selfOrderingDataResultProductProducts.comboIds = comboIds;
	}
	final String? image128 = jsonConvert.convert<String>(json['image_128']);
	if (image128 != null) {
		selfOrderingDataResultProductProducts.image128 = image128;
	}
	final List<String>? notes = jsonConvert.convertListNotNull<String>(json['notes']);
	if (notes != null) {
		selfOrderingDataResultProductProducts.notes = notes;
	}
	return selfOrderingDataResultProductProducts;
}

Map<String, dynamic> $SelfOrderingDataResultProductProductsToJson(SelfOrderingDataResultProductProducts entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['barcode'] = entity.barcode;
	data['default_code'] = entity.defaultCode;
	data['lst_price'] = entity.lstPrice;
	data['need_vegetable_sequence'] = entity.needVegetableSequence;
	data['can_set_attributes_qty'] = entity.canSetAttributesQty;
	data['attribute_line_ids'] =  entity.attributeLineIds;
	data['pos_categ_ids'] =  entity.posCategIds;
	data['combo_ids'] =  entity.comboIds;
	data['image_128'] = entity.image128;
	data['notes'] =  entity.notes;
	return data;
}

SelfOrderingDataResultPosCombo $SelfOrderingDataResultPosComboFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultPosCombo selfOrderingDataResultPosCombo = SelfOrderingDataResultPosCombo();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultPosCombo.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		selfOrderingDataResultPosCombo.name = name;
	}
	final List<int>? comboLineIds = jsonConvert.convertListNotNull<int>(json['combo_line_ids']);
	if (comboLineIds != null) {
		selfOrderingDataResultPosCombo.comboLineIds = comboLineIds;
	}
	final double? basePrice = jsonConvert.convert<double>(json['base_price']);
	if (basePrice != null) {
		selfOrderingDataResultPosCombo.basePrice = basePrice;
	}
	return selfOrderingDataResultPosCombo;
}

Map<String, dynamic> $SelfOrderingDataResultPosComboToJson(SelfOrderingDataResultPosCombo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['combo_line_ids'] =  entity.comboLineIds;
	data['base_price'] = entity.basePrice;
	return data;
}

SelfOrderingDataResultPosComboLine $SelfOrderingDataResultPosComboLineFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultPosComboLine selfOrderingDataResultPosComboLine = SelfOrderingDataResultPosComboLine();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultPosComboLine.id = id;
	}
	final List<String>? productId = jsonConvert.convertListNotNull<String>(json['product_id']);
	if (productId != null) {
		selfOrderingDataResultPosComboLine.productId = productId;
	}
	final double? comboPrice = jsonConvert.convert<double>(json['combo_price']);
	if (comboPrice != null) {
		selfOrderingDataResultPosComboLine.comboPrice = comboPrice;
	}
	final List<String>? comboId = jsonConvert.convertListNotNull<String>(json['combo_id']);
	if (comboId != null) {
		selfOrderingDataResultPosComboLine.comboId = comboId;
	}
	return selfOrderingDataResultPosComboLine;
}

Map<String, dynamic> $SelfOrderingDataResultPosComboLineToJson(SelfOrderingDataResultPosComboLine entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['product_id'] =  entity.productId;
	data['combo_price'] = entity.comboPrice;
	data['combo_id'] =  entity.comboId;
	return data;
}

SelfOrderingDataResultCurrentLanguage $SelfOrderingDataResultCurrentLanguageFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultCurrentLanguage selfOrderingDataResultCurrentLanguage = SelfOrderingDataResultCurrentLanguage();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultCurrentLanguage.id = id;
	}
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		selfOrderingDataResultCurrentLanguage.code = code;
	}
	final String? displayName = jsonConvert.convert<String>(json['display_name']);
	if (displayName != null) {
		selfOrderingDataResultCurrentLanguage.displayName = displayName;
	}
	final String? flagImageUrl = jsonConvert.convert<String>(json['flag_image_url']);
	if (flagImageUrl != null) {
		selfOrderingDataResultCurrentLanguage.flagImageUrl = flagImageUrl;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		selfOrderingDataResultCurrentLanguage.image = image;
	}
	return selfOrderingDataResultCurrentLanguage;
}

Map<String, dynamic> $SelfOrderingDataResultCurrentLanguageToJson(SelfOrderingDataResultCurrentLanguage entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['code'] = entity.code;
	data['display_name'] = entity.displayName;
	data['flag_image_url'] = entity.flagImageUrl;
	data['image'] = entity.image;
	return data;
}

SelfOrderingDataResultAvailableLanguage $SelfOrderingDataResultAvailableLanguageFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultAvailableLanguage selfOrderingDataResultAvailableLanguage = SelfOrderingDataResultAvailableLanguage();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultAvailableLanguage.id = id;
	}
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		selfOrderingDataResultAvailableLanguage.code = code;
	}
	final String? displayName = jsonConvert.convert<String>(json['display_name']);
	if (displayName != null) {
		selfOrderingDataResultAvailableLanguage.displayName = displayName;
	}
	final String? flagImageUrl = jsonConvert.convert<String>(json['flag_image_url']);
	if (flagImageUrl != null) {
		selfOrderingDataResultAvailableLanguage.flagImageUrl = flagImageUrl;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		selfOrderingDataResultAvailableLanguage.image = image;
	}
	return selfOrderingDataResultAvailableLanguage;
}

Map<String, dynamic> $SelfOrderingDataResultAvailableLanguageToJson(SelfOrderingDataResultAvailableLanguage entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['code'] = entity.code;
	data['display_name'] = entity.displayName;
	data['flag_image_url'] = entity.flagImageUrl;
	data['image'] = entity.image;
	return data;
}

SelfOrderingDataResultHomeImages $SelfOrderingDataResultHomeImagesFromJson(Map<String, dynamic> json) {
	final SelfOrderingDataResultHomeImages selfOrderingDataResultHomeImages = SelfOrderingDataResultHomeImages();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		selfOrderingDataResultHomeImages.id = id;
	}
	final String? data = jsonConvert.convert<String>(json['data']);
	if (data != null) {
		selfOrderingDataResultHomeImages.data = data;
	}
	return selfOrderingDataResultHomeImages;
}

Map<String, dynamic> $SelfOrderingDataResultHomeImagesToJson(SelfOrderingDataResultHomeImages entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['data'] = entity.data;
	return data;
}